<?php
/**
 * Condition that checks if a value is in an array.
 *
 * Typically used together with Workflow_Condition_Variable to use the
 * condition on a workflow variable.
 *
 * <code>
 * <?php
 * $condition = new Workflow_Condition_Variable(
 *   'variable name',
 *   new Workflow_Condition_InArray( array( ... ) )
 * );
 * ?>
 * </code>
 * @author dengdl
 *
 */
class Workflow_Condition_InArray extends Workflow_Condition_Comparison
{
	/**
     * Evaluates this condition with $value and returns true if it is false or false if it is not.
     *
     * @param  mixed $value
     * @return boolean true when the condition holds, false otherwise.
     * @ignore
     */
    public function evaluate( $value )
    {
        return in_array( $value, $this->value );
    }
	
}
?>